<div class="modal-header">
    <button type="button" class="close" aria-label="Close" ng-click="$ctrl.close()"><span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">Add to Dashboard</h4>
</div>
<div class="modal-body">
    <form name="alertForm" class="form">
      <div class="form-group">
        <label>Choose the dashboard to add this query to:</label>
        <ui-select ng-model="$ctrl.dashboardList" reset-search-input="false" on-select="$ctrl.onDashboardSelected($item)" ng-disabled="$ctrl.saveInProgress">
          <ui-select-match placeholder="Search a dashboard by name">{{$select.selected.name}}</ui-select-match>
          <ui-select-choices repeat="q in $ctrl.dashboards"
                             refresh="$ctrl.searchDashboards($select.search, $ctrl.limitToUsersDashboards)"
                             refresh-delay="0">
            <div ng-bind-html="$ctrl.trustAsHtml(q.name | highlight: $select.search)"></div>
          </ui-select-choices>
        </ui-select>
      </div>
    </form>
</div>